warker.com

Retro Adventures Continue: the Color Computer 2

July 14th, 2024

CoCo Basics

OK, so having conquered Grant’s Six Five Chip 6809 Computer, or at least getting it to work and writing some assembly language programs for it, I wanted to work with a more capable 6809 based machine. Minimum required additions: a video display and built-in keyboard. The Radio Shack Color Computer (CoCo) 3 looked promising but they’re hard to find and fairly expensive. Then I got lucky and found a working $70 16K CoCo 2 at VCF East.

Upgrading it to 64K was dead easy, eight 4164 chips courtesy of AliExpress and solder one jumper and I had maxed out the RAM. The older BASIC ROM got replaced with an EPROM and small adapter board and I now have a top end (1980s era) CoCo 2. The one remaining hardware change I’d like to make is replacing the RF modulator module with a composite video board. I found a nice one on Zippster’s Web Site but he doesn’t seem active and hasn’t responded to my emails so I haven’t been able to get one as yet. I did find instructions for altering the RF module to composite, but if that failed I’d have a dead CoCo 2 with no easy way back to making it work again. I’d rather not take that risk. If anyone knows of a source for buying a Type A (vertical) composite video module I’d very much appreciate a link.

CoCo 2 Architecture

It’s a pretty basic setup for a 6809 computer that comes with some significant software challenges as a result. Pretty much everything is implemented in bare-minimal hardware. The keyboard is exposed as a raw key matrix that needs software scanning to detect keypresses. The serial port is an input bit and an output bit with no hardware serial chip, so serial communications means software bit-banging. And the cassette interface is just a single input bit and a six bit D to A converter output; all encoding and decoding is handled in software. And with no interrupt support, not even a timer, you can do one thing at a time and timing is by counting CPU clock cycles. Pretty significant limitations. But also about as simple as you can usefully get. Everything else is just code.

Software Plan

I had definite plans for how to proceed on the software side. First get my G6CC Demon debugger running on the CoCo2, then use that to bring up my other apps: Alf and Syl.

But before I could even consider starting that work I had to come up with a way to get my code into the CoCo. A plug-in EPROM cartridge with an SD card interface might be my ultimate goal but I wanted to start simply so the existing CoCo cassette interface was my target. No hardware modification required. I just needed a way to convert my LWTOOLS generated Intel HEX into whatever analog format the CoCo expected.

And so project number one was born: CoCoCass.

Retro Adventures: the 6809: the Hardware

July 9th, 2024

Back in the mist of time, in the primordial swamps of tech, (AKA the 70s and 80s), I did embedded programming for a living. I learned to love the 8080, 8085, Z80 and even, grudgingly, the 6502. But there was a siren call I never answered: the Motorola 6809. It looked like a minicomputer: reasonable 16 bit ops, general purpose index registers including a spare stack pointer, even multiply (well, 8 x 8 bits but still.) But I could never justify the expense of building a system around it so I never got to play with one.

Grant’s Six Chip 6809 Computer

Then a few years ago I had a health issue that resulted in a few months of resting and relaxing, and boredom. While browsing the Net I ran across this article:

Grant’s 6-chip 6809 computer

A six chip 6809 computer. No video or keyboard support. Just 32KB RAM, 16KB EPROM and a serial port. A perfect minimal machine to learn the 6809. A quick pass through Ali Express and I realized I could get all the chips I needed for about $20(US). Actually I could get enough for about five of them. In the end I left off the RS232 chip and just used an FTDI cable. And since I had a 32KB EPROM on hand I added a bank-select jumper for two 16KB banks.

Assembly went surprisingly easily. I did have to cobble up an EPROM programmer from an ESP8266 board, which I will hopefully document later. But it worked and I burned a version of BASIC to play with. Then the real fun started. I rewrote my old Z80 debugger (Demon) for the 6809, got a FORTH-like language running (Alf) and implemented a minimal LISP (Syl) to get a feel for how well the 6809 handles things. It handles them VERY well as it turns out. I love writing code for it as I seem to spend less time fighting the architecture to do what I want than on x80 CPUs.

But I wanted more and started looking for hardware that supported at least memory mapped video and a keyboard. And that’s how I landed on the venerable Radio Shack Color Computer 2.

The CoCo 2

I was actually hunting for a CoCo 3 because it supports a lot more banked-switched memory and has other improvements. But at VCF East I found a boxed CoCo 2 for $70 and took a chance. It worked albeit with VHF RF output to a TV rather than composite (if anyone has a lead on where I can get a composite card [type A?, the vertical mount one] please let me know.) The built-in BASIC runs fine and I even managed to download a few “cassette” based apps I found on The TRS-80 Color Computer Archive using my laptop. Next step was obviously to start working on my own apps including porting Demon, Alf and Syl to the CoCo.

I was considering making a SD or CF card cartridge for storage but wouldn’t it be cool to be able to download apps via the cassette port without needing another actual computer? Thus was born CoCoCass, an ESP32 based gadget that lets you load and save BASIC and machine language programs like it was the 80s: very, very slowly. But it should work on any CoCo without hardware modification needed. I’ll post the details of that here sometime soon.

Which is basically where things stand today.

A Small Matter of Programming

Since the hardware is settled, at least for now, next step is writing some code. At the moment I have Demon running pretty well on the CoCo, including cassette load and save commands. Next will probably be packaging up my basic I/O (display, keyboard, cassette) so I can use them in Alf and Syl. After than maybe add CoCo specific graphics support?

So that’s installment 1 of N of my Retro-computing Adventures on the 6809. Feel free to prod me if you have any questions or if you suspect I’ve gotten distracted and stopped posting again.

Dave

Next: the CoCo 2

Retro Adventures

July 9th, 2024

After a LONG lapse I’m going to attempt to justify hosting this site by actually posting stuff! Naturally, it will be retro-computing related because that’s kind of what I’m spending a lot of time doing of late. It’s a nice antidote to wrangling code signing and oddball Info.plist problems. So, hopefully, there will be regular posts here again. So maybe stay tuned?

First up: Retro Adventures with the 6809

Demon – A Debugger for the 16 bit 6809 CPU

November 13th, 2022

Just a quick post. Way back in time I did development work using the Z80 CPU from Zilog. It was good but I always wanted to play with the Hot New Hardware of then time: the Motorola 6809 processor. Flash forward about 40 years (yikes!) and I found Grant’s Six Chip Computer, the 6809 edition. A quick $40 or so order to AliExpress and I had all 6 parts I needed to build one, which I did.

Assembled G6CC 6809 Computer

(Before you ask, yes there are actually only 5 chips. To avoid mucking with RS232 level adapters I removed the RS232 level converter and instead used an FTDI adapter that talks TTL levels to the 6850 serial chip.)

After playing with BASIC for a few minutes of course the next step was to write my own standalone debugger. Using one I wrote for the Z80 as a base I ported it to the G6CC hardware. Wanting to learn the 6809 instruction set I decided to add an instant assembler, disassembler and tracer that could trace into EPROM. The result was Demon (DEbug MONitor) 1.7 for the 6809 the source for which you can download here:

Source code for Demon 1.7 Debugger

Future plans are to port a dialect of FORTH I wrote long ago to the 6809. When that’s done I’ll post it one this site as well.

Why did I do this? No idea, other than it was fun to be doing bare-metal assembly language programming again.

Remember? Isn’t Compatible with macOS 10.15 “Catalina”

October 3rd, 2019

MacOS 10.15 “Catalina” is about ready to drop and I wanted to make it clear that the current version of Remember? (V4.6.3) is a 32 bit app and will not run on it as only 64 bit apps are allowed. Adding 64 bit support will require essentially a complete rewrite and unfortunately I don’t know when that will happen.

It should in theory be possible to use virtual machine software such as Parallels or VMWare Fusion to run an older macOS version that is compatible with Remember? since I believe Apple does allow virtualized copies of macOS now, but I haven’t tested that yet.

I’m still amazed that after 30 years (!!) people are still using this goofy little app. Moving forward will definitely require a rewrite but sadly I can’t give any timeframe when that would happen.

Dave